<!doctype html>
<html class="no-js" lang="">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="x-ua-compatible" content="ie=edge">
        <title>Nestify</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <link rel="icon" type="image/x-icon" href="../images/favicon.ico">
	      <link rel="stylesheet" href="../styles/style.css">
    </head>
    <body>

        <div class="navbar navbar-default navbar-fixed-top visible-xs">
            <a href="../" class="navbar-brand">Nestify</a>
            <button type="button" class="btn btn-default btn-menu ion-ios-menu" id="btn-menu"></button>
        </div>

        <div class="xs-menu menu" id="mobile-menu">
                <div id="book-search-input" role="search"><input type="text" placeholder="请输入查询关键字"></div>            <compodoc-menu></compodoc-menu>
        </div>

        <div class="container-fluid main">
           <div class="row main">
               <div class="hidden-xs menu">
                   <compodoc-menu mode="normal"></compodoc-menu>
               </div>
               <!-- START CONTENT -->
               <div class="content controller">
                   <div class="content-data">





<ol class="breadcrumb">
  <li>Controllers</li>
  <li>IndexController</li>
</ol>

<ul class="nav nav-tabs" role="tablist">
        <li class="active">
            <a href="#info" role="tab" id="info-tab" data-toggle="tab" data-link="info">Info</a>
        </li>
        <li >
            <a href="#source" role="tab" id="source-tab" data-toggle="tab" data-link="source">Source</a>
        </li>
</ul>

<div class="tab-content">
    <div class="tab-pane fade active in" id="c-info">
        <p class="comment">
            <h3>文件</h3>
        </p>
        <p class="comment">
            <code>server/src/ssr/controllers/index.controller.ts</code>
        </p>






            <section>
    <h3 id="index">索引</h3>
    <table class="table table-sm table-bordered index-table">
        <tbody>

                <tr>
                    <td class="col-md-4">
                        <h6><b>方法</b></h6>
                    </td>
                </tr>
                <tr>
                    <td class="col-md-4">
                        <ul class="index-list">
                            <li>
                                    <span class="modifier">Async</span>
                                <a href="#announcement">announcement</a>
                            </li>
                            <li>
                                    <span class="modifier">Async</span>
                                <a href="#checkSVGCode">checkSVGCode</a>
                            </li>
                            <li>
                                    <span class="modifier">Async</span>
                                <a href="#concact">concact</a>
                            </li>
                            <li>
                                    <span class="modifier">Async</span>
                                <a href="#content">content</a>
                            </li>
                            <li>
                                    <span class="modifier">Async</span>
                                <a href="#contentId">contentId</a>
                            </li>
                            <li>
                                    <span class="modifier">Async</span>
                                <a href="#error">error</a>
                            </li>
                            <li>
                                    <span class="modifier">Async</span>
                                <a href="#getSVGCode">getSVGCode</a>
                            </li>
                            <li>
                                    <span class="modifier">Async</span>
                                <a href="#image">image</a>
                            </li>
                            <li>
                                    <span class="modifier">Async</span>
                                <a href="#index">index</a>
                            </li>
                            <li>
                                    <span class="modifier">Async</span>
                                <a href="#list">list</a>
                            </li>
                            <li>
                                    <span class="modifier">Async</span>
                                <a href="#message">message</a>
                            </li>
                            <li>
                                    <span class="modifier">Async</span>
                                <a href="#saveSuggesstion">saveSuggesstion</a>
                            </li>
                            <li>
                                    <span class="modifier">Async</span>
                                <a href="#suggestions">suggestions</a>
                            </li>
                            <li>
                                    <span class="modifier">Async</span>
                                <a href="#video">video</a>
                            </li>
                        </ul>
                    </td>
                </tr>





        </tbody>
    </table>
</section>

            <section>
    
    <h3 id="methods">
        方法
    </h3>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="announcement"></a>
                    <span class="name">
                        <b>
                            <span class="modifier">Async</span>
                            announcement
                        </b>
                        <a href="#announcement"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                    <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>announcement(req, res, params, query)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>装饰器列表 : </b>
                    <br />
                    <code>@Get(&#x27;announcement&#x27;)<br /></code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <div class="io-line">被定义在 <a href="" data-line="210"
                            class="link-to-prism">server/src/ssr/controllers/index.controller.ts:210</a></div>
                </td>
            </tr>


            <tr>
                <td class="col-md-4">

                    <div class="io-description">
                        <b>参数列表 :</b>
                        <table class="params">
                            <thead>
                                <tr>
                                    <td>名称</td>
                                    <td>可选的</td>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>req</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>res</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>params</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>query</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div>
                    </div>
                    <div class="io-description">
                        <b>返回 : </b>    <code>{}</code>

                    </div>
                    <div class="io-description">
                        
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="checkSVGCode"></a>
                    <span class="name">
                        <b>
                            <span class="modifier">Async</span>
                            checkSVGCode
                        </b>
                        <a href="#checkSVGCode"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                    <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>checkSVGCode(req, res, body, params, query)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>装饰器列表 : </b>
                    <br />
                    <code>@Post(&#x27;checkSVGCode&#x27;)<br /></code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <div class="io-line">被定义在 <a href="" data-line="260"
                            class="link-to-prism">server/src/ssr/controllers/index.controller.ts:260</a></div>
                </td>
            </tr>


            <tr>
                <td class="col-md-4">

                    <div class="io-description">
                        <b>参数列表 :</b>
                        <table class="params">
                            <thead>
                                <tr>
                                    <td>名称</td>
                                    <td>可选的</td>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>req</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>res</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>body</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>params</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>query</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div>
                    </div>
                    <div class="io-description">
                        <b>返回 : </b>    <code>{}</code>

                    </div>
                    <div class="io-description">
                        
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="concact"></a>
                    <span class="name">
                        <b>
                            <span class="modifier">Async</span>
                            concact
                        </b>
                        <a href="#concact"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                    <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>concact(req, res, params, query)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>装饰器列表 : </b>
                    <br />
                    <code>@Get(&#x27;concact&#x27;)<br /></code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <div class="io-line">被定义在 <a href="" data-line="222"
                            class="link-to-prism">server/src/ssr/controllers/index.controller.ts:222</a></div>
                </td>
            </tr>


            <tr>
                <td class="col-md-4">

                    <div class="io-description">
                        <b>参数列表 :</b>
                        <table class="params">
                            <thead>
                                <tr>
                                    <td>名称</td>
                                    <td>可选的</td>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>req</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>res</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>params</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>query</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div>
                    </div>
                    <div class="io-description">
                        <b>返回 : </b>    <code>{}</code>

                    </div>
                    <div class="io-description">
                        
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="content"></a>
                    <span class="name">
                        <b>
                            <span class="modifier">Async</span>
                            content
                        </b>
                        <a href="#content"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                    <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>content(req, res, params, query)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>装饰器列表 : </b>
                    <br />
                    <code>@Get(&#x27;content/:category&#x27;)<br /></code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <div class="io-line">被定义在 <a href="" data-line="101"
                            class="link-to-prism">server/src/ssr/controllers/index.controller.ts:101</a></div>
                </td>
            </tr>


            <tr>
                <td class="col-md-4">

                    <div class="io-description">
                        <b>参数列表 :</b>
                        <table class="params">
                            <thead>
                                <tr>
                                    <td>名称</td>
                                    <td>可选的</td>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>req</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>res</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>params</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>query</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div>
                    </div>
                    <div class="io-description">
                        <b>返回 : </b>    <code>{}</code>

                    </div>
                    <div class="io-description">
                        
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="contentId"></a>
                    <span class="name">
                        <b>
                            <span class="modifier">Async</span>
                            contentId
                        </b>
                        <a href="#contentId"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                    <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>contentId(req, res, params, query)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>装饰器列表 : </b>
                    <br />
                    <code>@Get(&#x27;content/id/:id&#x27;)<br /></code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <div class="io-line">被定义在 <a href="" data-line="87"
                            class="link-to-prism">server/src/ssr/controllers/index.controller.ts:87</a></div>
                </td>
            </tr>


            <tr>
                <td class="col-md-4">

                    <div class="io-description">
                        <b>参数列表 :</b>
                        <table class="params">
                            <thead>
                                <tr>
                                    <td>名称</td>
                                    <td>可选的</td>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>req</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>res</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>params</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>query</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div>
                    </div>
                    <div class="io-description">
                        <b>返回 : </b>    <code>{}</code>

                    </div>
                    <div class="io-description">
                        
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="error"></a>
                    <span class="name">
                        <b>
                            <span class="modifier">Async</span>
                            error
                        </b>
                        <a href="#error"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                    <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>error()</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>装饰器列表 : </b>
                    <br />
                    <code>@Get(&#x27;error&#x27;)<br /></code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <div class="io-line">被定义在 <a href="" data-line="287"
                            class="link-to-prism">server/src/ssr/controllers/index.controller.ts:287</a></div>
                </td>
            </tr>


            <tr>
                <td class="col-md-4">

                    <div class="io-description">
                        <b>返回 : </b>        <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >any</a></code>

                    </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="getSVGCode"></a>
                    <span class="name">
                        <b>
                            <span class="modifier">Async</span>
                            getSVGCode
                        </b>
                        <a href="#getSVGCode"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                    <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>getSVGCode(req, res, body, params, query)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>装饰器列表 : </b>
                    <br />
                    <code>@Get(&#x27;getSVGCode&#x27;)<br /></code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <div class="io-line">被定义在 <a href="" data-line="254"
                            class="link-to-prism">server/src/ssr/controllers/index.controller.ts:254</a></div>
                </td>
            </tr>


            <tr>
                <td class="col-md-4">

                    <div class="io-description">
                        <b>参数列表 :</b>
                        <table class="params">
                            <thead>
                                <tr>
                                    <td>名称</td>
                                    <td>可选的</td>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>req</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>res</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>body</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>params</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>query</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div>
                    </div>
                    <div class="io-description">
                        <b>返回 : </b>    <code>{}</code>

                    </div>
                    <div class="io-description">
                        
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="image"></a>
                    <span class="name">
                        <b>
                            <span class="modifier">Async</span>
                            image
                        </b>
                        <a href="#image"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                    <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>image(req, res, params, query)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>装饰器列表 : </b>
                    <br />
                    <code>@Get(&#x27;image/:category&#x27;)<br /></code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <div class="io-line">被定义在 <a href="" data-line="140"
                            class="link-to-prism">server/src/ssr/controllers/index.controller.ts:140</a></div>
                </td>
            </tr>


            <tr>
                <td class="col-md-4">

                    <div class="io-description">
                        <b>参数列表 :</b>
                        <table class="params">
                            <thead>
                                <tr>
                                    <td>名称</td>
                                    <td>可选的</td>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>req</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>res</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>params</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>query</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div>
                    </div>
                    <div class="io-description">
                        <b>返回 : </b>    <code>{}</code>

                    </div>
                    <div class="io-description">
                        
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="index"></a>
                    <span class="name">
                        <b>
                            <span class="modifier">Async</span>
                            index
                        </b>
                        <a href="#index"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                    <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>index(req, res, params, query)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>装饰器列表 : </b>
                    <br />
                    <code>@Get()<br /></code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <div class="io-line">被定义在 <a href="" data-line="42"
                            class="link-to-prism">server/src/ssr/controllers/index.controller.ts:42</a></div>
                </td>
            </tr>


            <tr>
                <td class="col-md-4">

                    <div class="io-description">
                        <b>参数列表 :</b>
                        <table class="params">
                            <thead>
                                <tr>
                                    <td>名称</td>
                                    <td>可选的</td>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>req</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>res</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>params</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>query</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div>
                    </div>
                    <div class="io-description">
                        <b>返回 : </b>    <code>{}</code>

                    </div>
                    <div class="io-description">
                        
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="list"></a>
                    <span class="name">
                        <b>
                            <span class="modifier">Async</span>
                            list
                        </b>
                        <a href="#list"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                    <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>list(req, res, params, query)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>装饰器列表 : </b>
                    <br />
                    <code>@Get(&#x27;list/:category&#x27;)<br /></code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <div class="io-line">被定义在 <a href="" data-line="121"
                            class="link-to-prism">server/src/ssr/controllers/index.controller.ts:121</a></div>
                </td>
            </tr>


            <tr>
                <td class="col-md-4">

                    <div class="io-description">
                        <b>参数列表 :</b>
                        <table class="params">
                            <thead>
                                <tr>
                                    <td>名称</td>
                                    <td>可选的</td>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>req</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>res</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>params</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>query</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div>
                    </div>
                    <div class="io-description">
                        <b>返回 : </b>    <code>{}</code>

                    </div>
                    <div class="io-description">
                        
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="message"></a>
                    <span class="name">
                        <b>
                            <span class="modifier">Async</span>
                            message
                        </b>
                        <a href="#message"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                    <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>message(req, res, params, query)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>装饰器列表 : </b>
                    <br />
                    <code>@Get(&#x27;message&#x27;)<br /></code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <div class="io-line">被定义在 <a href="" data-line="233"
                            class="link-to-prism">server/src/ssr/controllers/index.controller.ts:233</a></div>
                </td>
            </tr>


            <tr>
                <td class="col-md-4">

                    <div class="io-description">
                        <b>参数列表 :</b>
                        <table class="params">
                            <thead>
                                <tr>
                                    <td>名称</td>
                                    <td>可选的</td>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>req</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>res</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>params</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>query</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div>
                    </div>
                    <div class="io-description">
                        <b>返回 : </b>    <code>{}</code>

                    </div>
                    <div class="io-description">
                        
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="saveSuggesstion"></a>
                    <span class="name">
                        <b>
                            <span class="modifier">Async</span>
                            saveSuggesstion
                        </b>
                        <a href="#saveSuggesstion"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                    <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>saveSuggesstion(req, res, body, params, query)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>装饰器列表 : </b>
                    <br />
                    <code>@Post(&#x27;saveSuggesstion&#x27;)<br /></code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <div class="io-line">被定义在 <a href="" data-line="270"
                            class="link-to-prism">server/src/ssr/controllers/index.controller.ts:270</a></div>
                </td>
            </tr>


            <tr>
                <td class="col-md-4">

                    <div class="io-description">
                        <b>参数列表 :</b>
                        <table class="params">
                            <thead>
                                <tr>
                                    <td>名称</td>
                                    <td>可选的</td>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>req</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>res</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>body</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>params</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>query</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div>
                    </div>
                    <div class="io-description">
                        <b>返回 : </b>        <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >any</a></code>

                    </div>
                    <div class="io-description">
                        
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="suggestions"></a>
                    <span class="name">
                        <b>
                            <span class="modifier">Async</span>
                            suggestions
                        </b>
                        <a href="#suggestions"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                    <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>suggestions(req, res, params, query)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>装饰器列表 : </b>
                    <br />
                    <code>@Get(&#x27;suggestions&#x27;)<br /></code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <div class="io-line">被定义在 <a href="" data-line="245"
                            class="link-to-prism">server/src/ssr/controllers/index.controller.ts:245</a></div>
                </td>
            </tr>


            <tr>
                <td class="col-md-4">

                    <div class="io-description">
                        <b>参数列表 :</b>
                        <table class="params">
                            <thead>
                                <tr>
                                    <td>名称</td>
                                    <td>可选的</td>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>req</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>res</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>params</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>query</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div>
                    </div>
                    <div class="io-description">
                        <b>返回 : </b>    <code>{}</code>

                    </div>
                    <div class="io-description">
                        
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="video"></a>
                    <span class="name">
                        <b>
                            <span class="modifier">Async</span>
                            video
                        </b>
                        <a href="#video"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                    <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>video(req, res, params, query)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>装饰器列表 : </b>
                    <br />
                    <code>@Get(&#x27;video/:category&#x27;)<br /></code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <div class="io-line">被定义在 <a href="" data-line="179"
                            class="link-to-prism">server/src/ssr/controllers/index.controller.ts:179</a></div>
                </td>
            </tr>


            <tr>
                <td class="col-md-4">

                    <div class="io-description">
                        <b>参数列表 :</b>
                        <table class="params">
                            <thead>
                                <tr>
                                    <td>名称</td>
                                    <td>可选的</td>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>req</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>res</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>params</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                                <tr>
                                    <td>query</td>

                                    <td>
                                        否
                                    </td>


                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div>
                    </div>
                    <div class="io-description">
                        <b>返回 : </b>    <code>{}</code>

                    </div>
                    <div class="io-description">
                        
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
</section>    </div>


    <div class="tab-pane fade  tab-source-code" id="c-source">
        <pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { RedisService } from &#x27;nestjs-redis&#x27;;
import { Redis } from &#x27;ioredis&#x27;;
import * as _ from &#x27;lodash&#x27;;
import { Controller, Req, Res, Param, Query, Get, Post, Body, Session } from &#x27;@nestjs/common&#x27;;
import { CommonService } from &#x27;../../common/services/common.service&#x27;;
import { ContentService } from &#x27;../../common/services/content.service&#x27;;

const toGetMenuIndex &#x3D; (menus, asPath) &#x3D;&gt; {
	let path &#x3D; asPath.split(&#x27;?&#x27;).shift().split(&#x27;/&#x27;).pop();
	let index &#x3D; 0;
	let order &#x3D; 0;
	menus.forEach((menu, i) &#x3D;&gt; {
		if (menu.children &amp;&amp; menu.children.length &gt; 0) {
			menu.children.forEach((item, j) &#x3D;&gt; {
				if (path &#x3D;&#x3D;&#x3D; item.url.split(&#x27;/&#x27;).pop()) {
					index &#x3D; i;
					order &#x3D; j;
				}
			})
		}
	});
	return {
		menu_show: menus[index],
		order
	};
}

@Controller()
export class IndexController {

	redisClient: Redis;

	constructor(
		private readonly commonService: CommonService,
		private readonly contentService: ContentService,
		private readonly redisService: RedisService
	) {
		this.redisClient &#x3D; this.redisService.getClient();
	}

	@Get()
	async index(@Req() req, @Res() res, @Param() params, @Query() query) {
		const siteInfo &#x3D; await this.commonService.getSiteInfo();

		const activity_list &#x3D; await this.contentService.query({
			category: &#x27;精彩活动&#x27;,
			pageSize: 5
		});

		const news_list &#x3D; await this.contentService.query({
			category: &#x27;新闻动态&#x27;,
			pageSize: 5
		});

		const notice_list &#x3D; await this.contentService.query({
			category: &#x27;官方公告&#x27;,
			pageSize: 3
		});

		const scenic_list &#x3D; await this.contentService.query({
			category: &#x27;景点一览&#x27;,
			pageSize: 4
		});

		const characteristic_list &#x3D; await this.contentService.query({
			category: &#x27;工艺特色&#x27;,
			pageSize: 10
		});

		const video_list &#x3D; await this.contentService.query({
			category: &#x27;视频赏析&#x27;,
			pageSize: 1
		});

		return res.render(&#x27;/&#x27;, {
			siteInfo,
			news_list,
			activity_list,
			notice_list,
			scenic_list,
			characteristic_list,
			video_list
		});
	}

	@Get(&#x27;content/id/:id&#x27;)
	async contentId(@Req() req, @Res() res, @Param() params, @Query() query) {
		const { id } &#x3D; params;
		const siteInfo &#x3D; await this.commonService.getSiteInfo();
		const { content, parents } &#x3D; await this.contentService.findOneAndParents(id);

		return res.render(&#x27;/intro&#x27;, {
			type: &#x27;content&#x27;,
			siteInfo,
			content,
			parents
		});
	}

	@Get(&#x27;content/:category&#x27;)
	async content(@Req() req, @Res() res, @Param() params, @Query() query) {
		// /content/introduction
		// /content/geo_profile
		// /content/culture
		// /content/development
		// /content/instructions

		const { url } &#x3D; req.raw;
		const siteInfo &#x3D; await this.commonService.getSiteInfo();
		const { menu_show, order } &#x3D; toGetMenuIndex(siteInfo.menus, url);
		const result &#x3D; await this.contentService.query({ category: menu_show.children[order].name, page: 0, pageSize: 1 });

		return res.render(&#x27;/intro&#x27;, {
			type: &#x27;content&#x27;,
			siteInfo,
			content: result[0] ? result[0][0] : {}
		});
	}

	@Get(&#x27;list/:category&#x27;)
	async list(@Req() req, @Res() res, @Param() params, @Query() query) {
		// /list/scenery
		// /list/activities
		// /list/news

		const { page } &#x3D; query;
		const { url } &#x3D; req.raw;
		const siteInfo &#x3D; await this.commonService.getSiteInfo();
		const { menu_show, order } &#x3D; toGetMenuIndex(siteInfo.menus, url);
		const result &#x3D; await this.contentService.query({ category: menu_show.children[order].name, page: page ? Number(page) : 0 });

		return res.render(&#x27;/intro&#x27;, {
			type: &#x27;list&#x27;,
			siteInfo,
			list: result
		});
	}

	@Get(&#x27;image/:category&#x27;)
	async image(@Req() req, @Res() res, @Param() params, @Query() query) {
		// /image/specialty
		// /image/crafts
		// /image/guide
		// /image/photo
		// /image/delicious
		// /image/hotel
		// /image/shopping
		// /image/entertainment
		// /image/trips
		// /image/travels

		const { id } &#x3D; query;
		const { page } &#x3D; query;
		const { url } &#x3D; req.raw;
		const siteInfo &#x3D; await this.commonService.getSiteInfo();

		if (id) {
			const { content, parents } &#x3D; await this.contentService.findOneAndParents(id);

			return res.render(&#x27;/intro&#x27;, {
				type: &#x27;imageDetail&#x27;,
				siteInfo,
				content,
				parents
			});
		} else {
			const { menu_show, order } &#x3D; toGetMenuIndex(siteInfo.menus, url);
			const result &#x3D; await this.contentService.query({ category: menu_show.children[order].name, page: page ? Number(page) : 0, pageSize: 12 });
			
			return res.render(&#x27;/intro&#x27;, {
				type: &#x27;image&#x27;,
				siteInfo,
				list: result
			});
		}
	}

	@Get(&#x27;video/:category&#x27;)
	async video(@Req() req, @Res() res, @Param() params, @Query() query) {
		// /video/characteristic
		// /video/show

		const { id } &#x3D; query;
		const { page } &#x3D; query;
		const { url } &#x3D; req.raw;
		const siteInfo &#x3D; await this.commonService.getSiteInfo();

		if (id) {
			const { content, parents } &#x3D; await this.contentService.findOneAndParents(id);

			return res.render(&#x27;/intro&#x27;, {
				type: &#x27;videoDetail&#x27;,
				siteInfo,
				content,
				parents
			});
		} else {
			const { menu_show, order } &#x3D; toGetMenuIndex(siteInfo.menus, url);
			const result &#x3D; await this.contentService.query({ category: menu_show.children[order].name, page: page ? Number(page) : 0, pageSize: 12 });

			return res.render(&#x27;/intro&#x27;, {
				type: &#x27;video&#x27;,
				siteInfo,
				list: result
			});
		}
	}

	@Get(&#x27;announcement&#x27;)
	async announcement(@Req() req, @Res() res, @Param() params, @Query() query) {
		const { page } &#x3D; query;
		const siteInfo &#x3D; await this.commonService.getSiteInfo();
		const result &#x3D; await this.contentService.query({ category: &#x27;官方公告&#x27;, page: page ? Number(page) : 0, pageSize: 20 });

		return res.render(&#x27;/announcement&#x27;, {
			siteInfo,
			list: result
		});
	}

	@Get(&#x27;concact&#x27;)
	async concact(@Req() req, @Res() res, @Param() params, @Query() query) {
		const siteInfo &#x3D; await this.commonService.getSiteInfo();
		const result &#x3D; await this.contentService.query({ category: &#x27;联系方式&#x27;, pageSize: 1000 });

		return res.render(&#x27;/concact&#x27;, {
			siteInfo,
			list: result
		});
	}

	@Get(&#x27;message&#x27;)
	async message(@Req() req, @Res() res, @Param() params, @Query() query) {
		const { page } &#x3D; query;
		const siteInfo &#x3D; await this.commonService.getSiteInfo();
		const result &#x3D; await this.contentService.query({ category: &#x27;留言咨询&#x27;, page: page ? Number(page) : 0, pageSize: 10 });

		return res.render(&#x27;/message&#x27;, {
			siteInfo,
			list: result
		});
	}

	@Get(&#x27;suggestions&#x27;)
	async suggestions(@Req() req, @Res() res, @Param() params, @Query() query) {
		const siteInfo &#x3D; await this.commonService.getSiteInfo();

		return res.render(&#x27;/suggestions&#x27;, {
			siteInfo
		});
	}

	@Get(&#x27;getSVGCode&#x27;)
	async getSVGCode(@Req() req, @Res() res, @Body() body, @Param() params, @Query() query) {
		const svg_obj &#x3D; await this.commonService.getSVGCode();
		return res.send(svg_obj);
	}

	@Post(&#x27;checkSVGCode&#x27;)
	async checkSVGCode(@Req() req, @Res() res, @Body() body, @Param() params, @Query() query) {
		const { svg_hash, svg_text } &#x3D; body;
		const result &#x3D; await this.commonService.checkSVGCode(svg_hash, svg_text);
		
		return res.send({
			result
		});
	}

	@Post(&#x27;saveSuggesstion&#x27;)
	async saveSuggesstion(@Req() req, @Res() res, @Body() body, @Param() params, @Query() query) {
		body.question &#x3D; body.title;
		delete body.title;
		const result &#x3D; await this.contentService.save({
			category: &#x27;留言咨询&#x27;,
			ex_info: body
		});
		if (result) {
			res.send({ result: true });
		} else {
			res.send({ result: false });
		}
		
	}


	@Get(&#x27;error&#x27;)
	async error() {
		throw new Error(&#x27;服务器错误&#x27;);
	}
}
</code></pre>
    </div>
</div>













                   </div><div class="search-results">
    <div class="has-results">
        <h1 class="search-results-title"><span class='search-results-count'></span> result-matching "<span class='search-query'></span>"</h1>
        <ul class="search-results-list"></ul>
    </div>
    <div class="no-results">
        <h1 class="search-results-title">无匹配的结果 "<span class='search-query'></span>"</h1>
    </div>
</div>
</div>
               <!-- END CONTENT -->
           </div>
       </div>

       <script>
            var COMPODOC_CURRENT_PAGE_DEPTH = 1;
            var COMPODOC_CURRENT_PAGE_CONTEXT = 'controller';
            var COMPODOC_CURRENT_PAGE_URL = 'IndexController.html';
       </script>

       <script src="../js/libs/custom-elements.min.js"></script>
       <script src="../js/libs/lit-html.js"></script>
       <!-- Required to polyfill modern browsers as code is ES5 for IE... -->
       <script src="../js/libs/custom-elements-es5-adapter.js" charset="utf-8" defer></script>
       <script src="../js/menu-wc.js" defer></script>

       <script src="../js/libs/bootstrap-native.js"></script>

       <script src="../js/libs/es6-shim.min.js"></script>
       <script src="../js/libs/EventDispatcher.js"></script>
       <script src="../js/libs/promise.min.js"></script>
       <script src="../js/libs/zepto.min.js"></script>

       <script src="../js/compodoc.js"></script>

       <script src="../js/tabs.js"></script>
       <script src="../js/menu.js"></script>
       <script src="../js/libs/clipboard.min.js"></script>
       <script src="../js/libs/prism.js"></script>
       <script src="../js/sourceCode.js"></script>
          <script src="../js/search/search.js"></script>
          <script src="../js/search/lunr.min.js"></script>
          <script src="../js/search/search-lunr.js"></script>
          <script src="../js/search/search_index.js"></script>
       <script src="../js/lazy-load-graphs.js"></script>


    </body>
</html>
